<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 


<jsp:useBean id="randomId" class="com.lmpop.frame.util.RandomID" scope="page" />  
<%
	 
	String model_id = randomId.GenTradeId();
	String biz_id = "",s_cust_id="";
	if(request.getParameter("biz_id")!=null && !request.getParameter("biz_id").equals("")){
		biz_id = request.getParameter("biz_id");		 
	}
	String cust_id="",publish_user_id="",cust_class="";;
	if(session.getAttribute("session_cust_id")!=null){
		cust_id  = session.getAttribute("session_cust_id").toString();
	}
	if(session.getAttribute("session_user_id")!=null){
		publish_user_id  = session.getAttribute("session_user_id").toString();
	}                     
  if(request.getParameter("cust_id")!=null && !request.getParameter("cust_id").equals("")){
		s_cust_id = request.getParameter("cust_id");		
	}
	
%>	
<html>
  <head>
    <title>发布规格信息</title>
	<link href="/program/company/index/css/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="biz.js"></script>
    <script type="text/javascript"> 
var record={ 
num:"" 
} 
var checkDecimal=function(n){ 
var decimalReg=/^\d{0,8}\.{0,1}(\d{1,3})?$/;//var decimalReg=/^[-\+]?\d{0,8}\.{0,1}(\d{1,2})?$/; 
if(n.value!=""&&decimalReg.test(n.value)){ 
record.num=n.value; 
}else{ 
if(n.value!=""){ 
n.value=record.num; 
} 
} 
} 
</script> 
 </head>

<body>
	<h1>新增规格型号</h1>
	     
	<form action="/doTradeReg.do" method="post" name="addForm">
	 <table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>规格图片和详细说明</h4>
		  <span>规格图片和详细说明不是必填项，如果要快速输入，这两个字段可以留空</span><br/>
		  </td>
        </tr>
      </table>
      <br/>
      
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtabadd">
		
		 

		<tr>
			<td class="labletd" width="20%">
				 商品名称：<font color="red">*</font>
			</td>
			<td>
				  <input type="text" name="model_name" id="model_name" size="62" maxlength="100" />
			 </td>
			 <td class="labletd" width="20%">规格标准：<font color="red">*</font></td>	   
		  <td width="28%" colspan="2">
			 <input type="text" name="specification" id="specification"  maxlength="250"/>
		  </td>
		</tr>

		
	<tr>
	  <td class="labletd" width="20%">出厂单价：<font color="red">*</font></td>	   <!-- onKeyUp="if(!/^[0-9][0-9]\.*$/.test(this.value))this.value='';"-->
	  <td width="28%">
		 <input type="text" name="out_biz_fee" id="out_biz_fee" size="30" maxlength="15" onkeyup='checkDecimal(this)' onblur="sumfee()"/>
	  </td>
	  <td class="labletd" width="20%">中转服务费：<font color="red">*</font></td>	   
	  <td width="28%">
		 <input type="text" name="middle_fee" id="middle_fee"  maxlength="15"  onkeyup='checkDecimal(this)' onblur="sumfee()"/>
	  </td>
	</tr>  
	<tr>
	  <td class="labletd" width="25%">长途物流成本：<font color="red">*</font></td>	   <!-- onKeyUp="if(!/^[0-9][0-9]\.*$/.test(this.value))this.value='';"-->
	  <td width="28%">
		 <input type="text" name="log_fee" id="log_fee" size="30" maxlength="15" onkeyup='checkDecimal(this)' onblur="sumfee()"/>
	  </td>
	  <td class="labletd" width="20%">售后亏损：<font color="red">*</font></td>	   
	  <td width="28%">
		 <input type="text" name="sale_fee" id="sale_fee"  maxlength="15"  onkeyup='checkDecimal(this)'  onblur="sumfee()"/>
	  </td>
	</tr> 
	 
	
	<tr>
	  <td class="labletd" width="20%">销售价格：<font color="red">*</font></td>	   <!-- onKeyUp="if(!/^[0-9][0-9]\.*$/.test(this.value))this.value='';"-->
	  <td width="28%" colspan="3">
		 <input type="text" name="biz_price" id="biz_price" size="30" maxlength="15" onkeyup='checkDecimal(this)' readonly="true" enabled="false"/>
		 销售价格=（出厂单价+中转服务费+长途物流成本+售后亏损）/ 0.99（打款手续费）
	  </td>
 
	</tr>
  
	 
  <tr>
	  <td class="labletd" width="20%">供货量：</td>	   <!-- onKeyUp="if(!/^[0-9][0-9]\.*$/.test(this.value))this.value='';"-->
	  <td width="28%" colspan="3">
		 <input type="text" name="max_supply" id="max_supply" size="30" maxlength="15" onkeyup='checkDecimal(this)'/>
		
	  </td>
 
	</tr>
	  
	<tr>
	  <td class="labletd" width="20%">重量：</td>	   
	  <td width="28%">
		 <input type="text" name="weight" id="weight" size="30" maxlength="50" />
	  </td>
	  <td width="12%" class="labletd">最小起批量：<font color="red">*</font></td>
	  <td width="50%">
		<input name="mini_biz_sum" id="mini_biz_sum" type="text" maxlength="50" size="30"  />
	  </td>
	</tr>
  <tr>
			<td class="labletd" width="20%">
				图片：		
			</td>
			<td colspan="3">
				<jsp:include page="/program/inc/uploadImgInc.jsp">
					<jsp:param name="attach_root_id" value="<%=model_id%>" />
					<jsp:param name="img_type" value="1" />
					<jsp:param name="req_type" value="sale" />
				</jsp:include>
			</td>
		</tr>
  
    
     
     
	</table>
	 	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="3786" />
				<input type="hidden" name="cust_id" id="cust_id" value="<%=s_cust_id%>" />
				<input type="hidden" name="user_id" id="user_id" value="<%=publish_user_id%>" />
				<input type="hidden" name="biz_id" id="biz_id" value="<%=biz_id%>" />	
				<input type="hidden" name="model_id" id="model_id" value="<%=model_id%>" />	
				 
				<input type="button" class="buttoncss" name="tradeSub" value="提交" onclick="subModelForm()"/>&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='modelmgr.jsp?biz_id=<%=biz_id%>&cust_id=<%=s_cust_id%>';"/>
			</td>
		</tr>
	</table>
	
	
                                                                                                
	</form>

</body>

</html>
